/*************************************************************************
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ************************************************************************/


/**
 * @file
 * CRtmpMsgCreator.h
 *
 * @author
 * Ales Podskalsky (<a href="mailto:podskale@fel.cvut.cz">podskale@fel.cvut.cz</a>)
 *
 * @brief
 * Factory for RTMP messages.
 */

#ifndef CRTMPMSGCREATOR_H
#define CRTMPMSGCREATOR_H

#include "crtmpmessage.h"
#include <string>

class CRtmpMsgCreator
{
    public:
        CRtmpMsgCreator();
        ~CRtmpMsgCreator();

    public:
        CRtmpMessage ConnectReply();
        CRtmpMessage CreateStreamReply(int iTransID);
        CRtmpMessage AcceptReply(int iTransID);
        CRtmpMessage InviteReply();
        CRtmpMessage StreamMessage(const std::string &stdPayload, int channel);
        CRtmpMessage PublishReply(int iTransID);
        CRtmpMessage PlayReply(int iTransID);
        CRtmpMessage ByedRequest(int iTransID);
        CRtmpMessage RejectedRequest(int iTransID);

    private:
        CRtmpMessage CreateMessage(int timestamp, CRtmpMessage::MsgType type, int streamId, const std::string &payload);

        int m_iStreamID;


};



#endif // CRTMPMSGCREATOR_H
